App({
  onLaunch: function (options) {
    wx.login({
      success(res) {
        if (res.code) {
          wx.request({
            url: 'https://miniapp.odeman.com/pay/getopenid.php?code='+res.code,
            data: {},
            method:'post',
            header: {
              "Content-Type": "application/x-www-form-urlencoded"
            },
            success: function (res) {
              wx.setStorage({
                key: "openid",
                data: res.data.openid
              })
            }
          })
        } else {
          console.log('登录失败！' + res.errMsg)
        }
      }

    })
  },
  onShow:function(options) {
  
  },
  about:function(){
    wx.navigateTo({
      url: '../about/about',
    })
  },
  contact: function () {
    wx.navigateTo({
      url: '../contact/contact',
    })
  },
  appData: {
    userinfo: null,
    areaid:null,
    ids:null,
    userid:null
  },
  
})

